package yxy.game.pm2.module.kow;

import yxy.game.pm2.bean.module.rank.IWorshipableRank;
import yxy.game.pm2.bean.module.rank.PlayerRankModule;
import yxy.game.pm2.bean.module.rank.RankModule;
import yxy.game.pm2.bean.module.rank.RankWorship;

public class RankKowKing extends RankModule implements IWorshipableRank {
	private int areaGroupId; //战区id，按战区排名
	public int getAreaGroupId() {
		return areaGroupId;
	}

	public void setAreaGroupId(int areaGroupId) {
		this.areaGroupId = areaGroupId;
	}

	private RankWorship worship;

	public RankKowKing(int areaGroupId) {
		setAreaGroupId(areaGroupId);
		initInfo();
		worship = new RankWorship(rankKey(), rankName());
	}

	@Override
	public RankWorship getWorship() {
		return worship;
	}

	@Override
	public String rankName() {
		return PlayerRankModule.getAllRankNames().get(5);
	}

	@Override
	protected long valuePlastic(long value) {
		return value * 10;
	}

	@Override
	protected long valueRestore(long score) {
		return score / 10;
	}

	@Override
	protected String rankKey() {
		return String.format("WORLD:%s:RANK:KOW:KING", getAreaGroupId());
	}
}
